package home_work6;

import java.io.IOException;
import java.io.RandomAccessFile;

public class test8 {

	public static void main(String[] args) throws IOException {
		RandomAccessFile raf = new RandomAccessFile("raf.dat","rw");
		raf.writeInt(Integer.MAX_VALUE);
		raf.writeLong(Long.MAX_VALUE);
		raf.seek(0);
		int i = raf.readInt();
		long l = raf.readLong();
		System.out.println("int:"+i);
		System.out.println("long:"+l);
		raf.close();
	}

}
